<%--
  Created by IntelliJ IDEA.
  User: YanHilin
  Date: 2020/4/29
  Time: 19:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员登录</title>
    <base href="http://localhost:8080/onlineflower/">
    <%@ include file="/page/comment/head.jsp"%>
    <link rel="stylesheet" type="text/css" href="static/css/form.css">
</head>
<body>
<%@include file="/page/comment/head_nav.jsp"%>

<div id="content">

    <form action="adminServlet" method="post">
        <input type="hidden" name="action" value="login">
        <div class="form-group">
            <span class="glyphicon glyphicon-user"></span>  <label for="exampleInputEmail1">Adminid</label> <span>${requestScope.mess}</span>
            <input type="text" name="adminid" class="form-control input-lg" id="exampleInputEmail1" placeholder="adminid">
        </div>
        <div class="form-group">
            <span class="glyphicon glyphicon-edit"></span> <label for="exampleInputPassword1">Password</label>
            <input type="password" name="password" class="form-control input-lg" id="exampleInputPassword1" placeholder="Password">
        </div>
        <div class="form-group">
            <label class="glyphicon glyphicon-check">验证码</label>
            <div class="row">
                <div class="col-7">
                    <input id="input_code" type="text" class="form-control input-lg" name="code" placeholder="请输入验证码">
                </div>
                <div class="col-5">
                    <img id="code_img" src="KaptchaServlet.jpg" alt="">
                </div>
            </div>
        </div>
        <br/>
        <button type="submit" class="btn btn-secondary btn-lg btn-block"><span class="glyphicon glyphicon-send"></span> Submit</button>
    </form>

</div>
<script>
    $(function () {
        //给验证码绑定单击事件
        $("#code_img").click(function () {
            //alert("hello")
            //在事件响应发function函数中有一个this对象，这个this对象是当前正在响应的DOM对象
            this.src="${basePath}/KaptchaServlet.jpg?d="+new Date();
        })
    })
</script>
</body>
</html>
